/*
'===============================================================================
'  .RelCategoriesEntity
'===============================================================================
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DaoHelper.Religion.Entity.Helper
{
	public class RelCategoriesField
	{
		public static Field Id { get { return new Field("Id", 0); } }
		public static Field ParentId { get { return new Field("ParentId", 0); } }
		public static Field CatName { get { return new Field("CatName", 512); } }
		public static Field CatType { get { return new Field("CatType", 5); } }
		public static Field OrderIndex { get { return new Field("OrderIndex", 0); } }
		public static Field Enable { get { return new Field("Enable", 0); } }
		public static Field IsDeleted { get { return new Field("IsDeleted", 0); } }
		public static Field CreatedBy { get { return new Field("CreatedBy", 50); } }
		public static Field CreatedDate { get { return new Field("CreatedDate", 0); } }
		public static Field UpdatedBy { get { return new Field("UpdatedBy", 50); } }
		public static Field UpdatedDate { get { return new Field("UpdatedDate", 0); } }
		
	}
}

namespace DaoHelper.Religion.Entity
{
	public class RelCategoriesEntity
	{
		/// <summary>
		/// Class RelCategories is generation
		/// </summary>
		
		public RelCategoriesEntity()
		{
			// Nothing for now.
		}
		
		private const string TableName = "relCategories";
		
		
		private const string _IdProperty = "@Name:Id@DataType:uniqueidentifier@IsKey:True@Length:0";
		private bool _IdIsDirty = false;
        private Guid _IdValue;
        public Guid Id
        {
            get { return _IdValue; }
            set
            {
                _IdValue = value;
                _IdIsDirty = true;
            }
        }
		
		private const string _ParentIdProperty = "@Name:ParentId@DataType:uniqueidentifier@IsKey:False@Length:0";
		private bool _ParentIdIsDirty = false;
        private Guid _ParentIdValue;
        public Guid ParentId
        {
            get { return _ParentIdValue; }
            set
            {
                _ParentIdValue = value;
                _ParentIdIsDirty = true;
            }
        }
		
		private const string _CatNameProperty = "@Name:CatName@DataType:nvarchar(512)@IsKey:False@Length:512";
		private bool _CatNameIsDirty = false;
        private string _CatNameValue;
        public string CatName
        {
            get { return _CatNameValue; }
            set
            {
                _CatNameValue = value;
                _CatNameIsDirty = true;
            }
        }
		
		private const string _CatTypeProperty = "@Name:CatType@DataType:varchar(5)@IsKey:False@Length:5";
		private bool _CatTypeIsDirty = false;
        private string _CatTypeValue;
        public string CatType
        {
            get { return _CatTypeValue; }
            set
            {
                _CatTypeValue = value;
                _CatTypeIsDirty = true;
            }
        }
		
		private const string _OrderIndexProperty = "@Name:OrderIndex@DataType:int@IsKey:False@Length:0";
		private bool _OrderIndexIsDirty = false;
        private int _OrderIndexValue;
        public int OrderIndex
        {
            get { return _OrderIndexValue; }
            set
            {
                _OrderIndexValue = value;
                _OrderIndexIsDirty = true;
            }
        }
		
		private const string _EnableProperty = "@Name:Enable@DataType:bit@IsKey:False@Length:0";
		private bool _EnableIsDirty = false;
        private bool _EnableValue;
        public bool Enable
        {
            get { return _EnableValue; }
            set
            {
                _EnableValue = value;
                _EnableIsDirty = true;
            }
        }
		
		private const string _IsDeletedProperty = "@Name:IsDeleted@DataType:bit@IsKey:False@Length:0";
		private bool _IsDeletedIsDirty = false;
        private bool _IsDeletedValue;
        public bool IsDeleted
        {
            get { return _IsDeletedValue; }
            set
            {
                _IsDeletedValue = value;
                _IsDeletedIsDirty = true;
            }
        }
		
		private const string _CreatedByProperty = "@Name:CreatedBy@DataType:varchar(50)@IsKey:False@Length:50";
		private bool _CreatedByIsDirty = false;
        private string _CreatedByValue;
        public string CreatedBy
        {
            get { return _CreatedByValue; }
            set
            {
                _CreatedByValue = value;
                _CreatedByIsDirty = true;
            }
        }
		
		private const string _CreatedDateProperty = "@Name:CreatedDate@DataType:datetime@IsKey:False@Length:0";
		private bool _CreatedDateIsDirty = false;
        private DateTime _CreatedDateValue;
        public DateTime CreatedDate
        {
            get { return _CreatedDateValue; }
            set
            {
                _CreatedDateValue = value;
                _CreatedDateIsDirty = true;
            }
        }
		
		private const string _UpdatedByProperty = "@Name:UpdatedBy@DataType:varchar(50)@IsKey:False@Length:50";
		private bool _UpdatedByIsDirty = false;
        private string _UpdatedByValue;
        public string UpdatedBy
        {
            get { return _UpdatedByValue; }
            set
            {
                _UpdatedByValue = value;
                _UpdatedByIsDirty = true;
            }
        }
		
		private const string _UpdatedDateProperty = "@Name:UpdatedDate@DataType:datetime@IsKey:False@Length:0";
		private bool _UpdatedDateIsDirty = false;
        private DateTime _UpdatedDateValue;
        public DateTime UpdatedDate
        {
            get { return _UpdatedDateValue; }
            set
            {
                _UpdatedDateValue = value;
                _UpdatedDateIsDirty = true;
            }
        }
		
		
		public void ResetDirty()
        {
			_IdIsDirty = false;
			_ParentIdIsDirty = false;
			_CatNameIsDirty = false;
			_CatTypeIsDirty = false;
			_OrderIndexIsDirty = false;
			_EnableIsDirty = false;
			_IsDeletedIsDirty = false;
			_CreatedByIsDirty = false;
			_CreatedDateIsDirty = false;
			_UpdatedByIsDirty = false;
			_UpdatedDateIsDirty = false;
		
		}
	}
}
